				<div class="block">
					<div class="flink"><?php 
						if(isset($flink['link_title'])){echo $flink['link_title']; unset($flink['link_title']);}
						?></div>
					<ul class="flinklist">
						<?php 
						if($flink){
							foreach($flink as $v){
								echo '<li ><a href="'.$v['flink_url'].'" target="_blank">'.$v['flink_tit'].'</a></li>';
							}
						}
						?>
						 
					</ul>
			</div>
		</div>
		<div id="footer">
			Copyright &copy 2011 - 2012 北京乐知华文文化传播有限公司   All Rights Reserved 乐知华文 版权所有
		</div>
		<div style="display: none;">
		<?php 
		if(isset($trcjs['trcjs'])){
			echo $trcjs['trcjs'];  
		}
		?>
		</div>
	</div>
	<!-- container end -->
	<p style="display: none;">Page rendered in <strong>{elapsed_time}</strong> seconds</p>
	<script type="text/javascript" src="<?php echo base_url();?>resources/js/jquery-1.4.2.js"></script>
		<script>
		jQuery.cookie = function(name, value, options) {  
		    if (typeof value != 'undefined') { // name and value given, set cookie  
		        options = options || {};  
		        if (value === null) {  
		            value = '';  
		            options.expires = -1;  
		        }  
		        var expires = '';  
		        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {  
		            var date;  
		            if (typeof options.expires == 'number') {  
		                date = new Date();  
		                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));  
		            } else {  
		                date = options.expires;  
		            }  
		            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE  
		        }  
		        var path = options.path ? '; path=' + options.path : '';  
		        var domain = options.domain ? '; domain=' + options.domain : '';  
		        var secure = options.secure ? '; secure' : '';  
		        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');  
		    } else { // only name given, get cookie  
		        var cookieValue = null;  
		        if (document.cookie && document.cookie != '') {  
		            var cookies = document.cookie.split(';');  
		            for (var i = 0; i < cookies.length; i++) {  
		                var cookie = jQuery.trim(cookies[i]);  
		                // Does this cookie string begin with the name we want?  
		                if (cookie.substring(0, name.length + 1) == (name + '=')) {  
		                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));  
		                    break;  
		                }  
		            }  
		        }  
		        return cookieValue;  
		    }  
		};  
		function getcookie(name) {  
		var cookie_start = document.cookie.indexOf(name);  
		var cookie_end = document.cookie.indexOf(";", cookie_start);  
		return cookie_start == -1 ? '' : unescape(document.cookie.substring(cookie_start + name.length + 1, (cookie_end > cookie_start ? cookie_end : document.cookie.length)));  
		}  
		function setcookie(cookieName, cookieValue, seconds, path, domain, secure) {  
		    var expires = new Date();  
		    expires.setTime(expires.getTime() + seconds);  
		    document.cookie = escape(cookieName) + '=' + escape(cookieValue)  
		                                            + (expires ? '; expires=' + expires.toGMTString() : '')  
		                                            + (path ? '; path=' + path : '/')  
		                                            + (domain ? '; domain=' + domain : '')  
		                                            + (secure ? '; secure' : '');  
		}  

		
		function changeL($l){
			$.post("/index.php/home/changL",{l:$l},
					function (msg){// alert(msg);
					location.reload();
				}
			);
		}
		function showSubList(id){
			$('#'+id).show();
		}
		function hideSubList(id){
			$('#'+id).hide();
		}
		function showCourse(id,to){
			var tab = '<?php echo $tab;?>';
			if(to!='' && to != undefined && to != tab ){
				var lhref = location.href;
				if(tab == 'index'){
					lhref = "/index.php/home/index1";
					tab = 'index1';
				}
				location.href = lhref.replace(tab,to)+'#'+id;
				return ;
			}else {
				for(var i=1; i<6; i++){
					if(i==id){
						$("#id_course_"+id+"_0").css("color","#E46C0A");
						$("#id_course_"+id).show();
					}else{
						$("#id_course_"+i+"_0").css("color","#333333");
						$("#id_course_"+i).hide();
					}
				}
			} 
		}
		<?php if($tab != 'course' || $tab != 'cnknowledge'){ ?> 
		var l_url = location.href;
		var url_arr = l_url.split('#');
		var showId = url_arr[url_arr.length-1];		
		if(showId>0&&!isNaN(showId)){
			$(document).ready(showCourse(showId));
		}else{
			$(document).ready(showCourse(1)); 
		}
		<?php } ?>
		(function($){
			
			//daily one contents
			$.fn.dailyOneC = {
					renderTo: $(document.body),
					enable: true,
					height: 466,
					width: 600,
					id: 'dailyone_c',
					close:function(){
						$('#dailyone_c').remove(); 
						$.cookie('dailyone_showflag','2', {expires:1}); 
					}
			}
			
			function showDailyOne(flag){
				//chrome
				var h_center = screen.width/2;
				var v_center = screen.height/2;
				
				var settingc = '';
				var psc = $.extend({},$.fn.dailyOneC,settingc); 
				psc.renderTo = (typeof psc.renderTo == 'string' ? $(psc.renderTo) : psc.renderTo);
				var top_ = v_center - psc.height/2;
				var left_ = h_center -  psc.width/2; 
				var top_1 = top_ - 20;
				var left_1 = left_ - 20;
				if( $('#'+psc.id).html() == undefined){
					var dailyOneCDiv = $('<div></div>')
						.attr('id',psc.id)
							.css('height', psc.height+'px')
							.css('width', psc.width+'px')
							.css('top',top_+'px')
							.css('left',left_+'px');
					var dailyOneCDiv1 = $('<div></div>')
						.attr('id',psc.id+'_1');
					var dailyOneCDivClose = $('<div>×</div>')
						.attr('id',psc.id+'_close')
						.attr('title', 'click to close')
						.bind('click',psc.close)
							.appendTo(dailyOneCDiv1);
					
					var dailyOneCDivTitle = $('<div><img src="<?php echo base_url();?>resources/image/style/dailyone_title.png" ></div>')
						.attr('id',psc.id+'_title')  
							.appendTo(dailyOneCDiv);
					var dailyOneCDivForCont = $('<div></div>')
						.attr('id',psc.id+'_forcont')
							.appendTo(dailyOneCDiv1); 
					var dailyOneCDivForContPic = $('<div></div>')
						.attr('id',psc.id+'_forcont_pic')
						<?php if(isset($dailyone['pic']) && $dailyone['pic'] != ''){
							echo '.attr("style","background:url('. $dailyone['pic'] .')")';
						}?>
							.appendTo(dailyOneCDivForCont); 
					var dailyOneCDivForContList = $('<div></div>')
						.attr('id',psc.id+'_forcont_list')
						.appendTo(dailyOneCDivForCont); 
					//内容嵌套
					var dailyOneCDivForContList0 = $('<div><div><?php echo $dailyone['pinyin'];?></div><div><?php echo $dailyone['sentence'];?></div></div>')
					.attr('id',psc.id+'_forcont_list_0')
						.appendTo(dailyOneCDivForContList); 
					
					<?php
					$explain = '';
					if (isset($dailyone['explain'])){
						foreach($dailyone['explain'] as $v){
							 $explain .='<div>'.$v.'</div>' ;
						}
					}
					if (isset($dailyone['en_explain'])){
						$explain .= '<div>'.$dailyone['en_explain'].'</div>' ;
					}
					$explain = addslashes($explain);
					?>
					var dailyOneCDivForContList1 = $('<div><?php echo $explain;?></div>')
					.attr('id',psc.id+'_forcont_list_1')
						.appendTo(dailyOneCDivForContList); 
				  
					dailyOneCDiv1.appendTo(dailyOneCDiv);
					if(flag == 1){
						dailyOneCDiv.appendTo(psc.renderTo); 
					}
				}
			}
			//关闭按钮
			function removeOne(id){
				$.cookie('dailyone_showflag','2', {expires:1});
				$('#'+id).remove();
				$('#'+id+'_title').remove();
			}
			//daily one tips
			$.fn.dailyOne = {
					renderTo: $(document.body),
					enable: true,
					id: 'dailyone',
					onClick: function(){
						showDailyOne(1);
						//$('#'+psc.id).toggle();
					}
			};
			var setting = '';
			var ps = $.extend({},$.fn.dailyOne,setting); 
			ps.renderTo = (typeof ps.renderTo == 'string' ? $(ps.renderTo) : ps.renderTo);
			var dailyOneDiv = $('<div></div>')
				.attr('id',ps.id).attr('title','Click to show message')
					.appendTo(ps.renderTo);
			
			var dailyOneSpan = $('<span></span>');
			
			dailyOneSpan.appendTo(dailyOneDiv);
			dailyOneSpan.text('每日一句'); 
			dailyOneDiv.bind('click',ps.onClick);
			
			var flag = $.cookie('dailyone_showflag') == null?1:2;
			showDailyOne(flag);
		})(jQuery);  
		</script> 
	</body>
</html>